Repository navigation
K2GO-383 fix(ui): dashboard rebuild progress persists, shows % and ETA - #633
Merged
Merged
Conversation
The rebuild bar reset to 0 on minimize/restore because the phase and its start lived in the fragment, which is recreated. Make DashboardRebuildService the persistent owner (it outlives the card): it polls the log, derives phase + percent + ETA (RebuildProgress), drives the notification via setProgress, and broadcasts percent/eta. The fragment observes and shows the bar + a "NN% ~N min left" caption; it no longer keeps its own resetting clock. ETA reuses EtaText (already localized), so no new strings. App-only, no dash-node change. +ETA unit tests.
Code-review cleanup: the "NN% ~N min left" caption was composed in both DashboardRebuildService (notification) and DashboardDetailFragment (card). Extract EtaText.percentAndEta so both share one composer and cannot drift.
Split the one overloaded label into a static description plus a live status line (percent + ETA), matching the content updaters (forgejo / build assets / add-ons) so progress reads the same across the app.
…d ETA right The percent and ETA shared one string and read as jammed. Anchor each in its own column (space-between): a width change in one no longer shifts the other, so the line does not jitter as values update.
Give each value an equal-weight column and center it in its own half, so the two numbers sit over the bar and are easier to locate. They stay in separate columns, so centering never makes them collide.
…/K2GO-383-rebuild-progress-persist
…eview) The service already polls /rebuild/log each tick for progress; carry the log tail on the same ACTION_PROGRESS broadcast and render the Details panel from it, dropping the fragment's second /rebuild/log poll loop. Also fix two stale comments (status columns are centered; percentAndEta is the notification caption, the card builds two columns from of()).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rebuild bar reset to 0 on minimize/restore because the phase clock lived in
the fragment, which is recreated. Move progress ownership to
DashboardRebuildService: it polls /rebuild/log each tick, derives
phase+percent+eta, drives the notification, broadcasts ACTION_PROGRESS, and
carries the log tail on the same tick. The fragment observes it, so the bar
resumes where the rebuild is and the Details panel feeds from that one poll.
Percent and ETA show as a status line under the label, in two equal centered
columns (percent | ETA) so the values sit over the bar and do not collide as
they update. ETA reuses the shared EtaText; no new strings. App-only, no
dash-node change.
Verified on device: resumes after minimize/restore and forced fragment
recreation; % and ETA shown; Details panel populates; row clears on completion.